      *> File Name     000020_Partial.cbl.
      *> Description   Using partial classes.
      *> Project Type  Console Application.
      *> CodePlex URL  http://cobol.codeplex.com/
 
       program-id.   Main.
       repository.
           class dog         as "Dog"
           class sys-console as "System.Console"
           .
       working-storage section.
       01  d        dog.
       01  newline  string  value type "System.Environment"::"NewLine".
       procedure division.
           move "Using Partial Classes" to sys-console::"Title"
               
           move dog::"New"("St. Bernard", "Fido") to d.
      
           display d::"Moniker" " is a " d::"Breed" "."
           display d::"Moniker" " says: " no advancing
           invoke  d::"Speak"
          
           display newline "Press any key to continue . . . "
               no advancing
           invoke sys-console::"ReadKey"(true)
           .
       end program   Main.
 
      *> Part 1 of class Dog:
       class-id.     Dog partial.
       working-storage section.
       01  _breed    string.
       01  _moniker  string.
      *>
       method-id.    New.
       linkage section.
       01  breed    string.
       01  moniker  string.
       procedure division using by value breed, moniker.
           move breed to _breed
           move moniker to _moniker
           .
       end method    New.
      *>
       end class     Dog.
 
      *> Part 2 of class Dog (could be in a separate file):
       class-id.     Dog partial.
      *>
       method-id.    get property Breed.
       procedure division giving s as string.
           move _breed to s.
       end method.
      *>
       method-id.    get property Moniker.
       procedure division giving s as string.
           move _moniker to s.
       end method.
      *>
       method-id.    Speak.
       procedure division.
           display "Woof, woof."
           .
       end method    Speak.
      *>
       end class     Dog.